﻿using System.Collections.Generic;
using System.Linq;

namespace GoGameClient.script.resources;

public class RoleResources
{
    //梦幻西游人族角色名称


    private List<RoleInfo> RoleList { get; } = new();


    public RoleResources()
    {
        RoleList.Add(new RoleInfo
        {
            Name = "飞燕女",
            Sex = 0,
            Race = Race.Ren,
            UseWeapon = "双短剑,环圈",
            JoinSects = "女儿村,大唐官府,方寸山,神木林,天机城",
            Introduce = "    深山有佳人,灼灼芙蓉姿,飞燕女轻盈飘逸,灵慧动人,自幼怜爱弱小,嫉恶如仇,一生自由自在,是大自然骄纵的宠儿。"
        });
        RoleList.Add(new RoleInfo
        {
            Name = "英女侠",
            Sex = 0,
            Race = Race.Ren,
            UseWeapon = "鞭,双短剑",
            JoinSects = "女儿村,大唐官府,方寸山,神木林,天机城",
            Introduce = "    兰心惠质出名门,英姿飒爽自芳华,英女侠天资聪颖,精通琴棋书画,心怀仁爱,行善不落人后,是位侠骨柔情的奇女子。"
        });
        RoleList.Add(new RoleInfo
        {
            Name = "巫蛮儿",
            Sex = 0,
            Race = Race.Ren,
            UseWeapon = "宝珠,法杖",
            JoinSects = "女儿村,大唐官府,方寸山,神木林,天机城",
            Introduce = "    嫣然巧笑踏绿萝,一路银铃一路歌,巫蛮儿质朴单纯,灵动可人,生性善良,活泼可爱,花盈翠影出神木,环佩婉转披香来。"
        });
        RoleList.Add(new RoleInfo
        {
            Name = "偃无师",
            Sex = 1,
            Race = Race.Ren,
            UseWeapon = "巨剑,剑",
            JoinSects = "化生寺,大唐官府,方寸山,神木林,天机城",
            Introduce = "    铁手隐机枢，巧夺天工，猛力执巨剑，志敌万均。偃无师性情冷厉，疏狂不羁，亦有奇谋满腹，铮铮傲骨。"
        });
        RoleList.Add(new RoleInfo
        {
            Name = "逍遥生",
            Sex = 1,
            Race = Race.Ren,
            UseWeapon = "扇子,剑",
            JoinSects = "化生寺,大唐官府,方寸山,神木林,天机城",
            Introduce = "    快意恩仇事,把酒踏歌行,一袭白衫,一纸折扇,逍遥生风流倜傥,潇洒自如,行事光明磊落,是世人乐于结交的谦谦君子。"
        });
        RoleList.Add(new RoleInfo
        {
            Name = "剑侠客",
            Sex = 1,
            Race = Race.Ren,
            UseWeapon = "刀,剑",
            JoinSects = "化生寺,大唐官府,方寸山,神木林,天机城",
            Introduce = "    霜刃露锋芒,飒沓如流星,剑侠客率情任性,狂放不羁,一生淡泊名利,嗜武如痴,英雄意,儿女情,独闯江湖半生醉,举杯邀月最销魂。"
        });
        RoleList.Add(new RoleInfo
        {
            Name = "舞天姬",
            Sex = 0,
            Race = Race.Xian,
            UseWeapon = "飘带,环圈",
            JoinSects = "普陀山,天宫,龙宫,凌波城,花果山",
            Introduce = "    霓裳曳广带,飘拂升天行,舞天姬明眸珠辉,瑰姿艳逸,生性善解人意,令人如沐春风.一舞绡丝动四方,观之心魂俱醉"
        });
        RoleList.Add(new RoleInfo
        {
            Name = "玄彩娥",
            Sex = 0,
            Race = Race.Xian,
            UseWeapon = "飘带,魔棒",
            JoinSects = "普陀山,天宫,龙宫,凌波城,花果山",
            Introduce = "    桂露对仙娥,星星下云逗,玄彩娥在花从中蝶翼翩翩,婀娜曼妙,犹聚晨露新聚,奇花初蕊,是集天地灵气于一身的百花仙子"
       });
        RoleList.Add(new RoleInfo
        {
            Name = "桃夭夭",
            Sex = 0,
            Race = Race.Xian,
            UseWeapon = "飘带,灯笼",
            JoinSects = "普陀山,天宫,龙宫,凌波城,花果山",
            Introduce = "    桃夭柳媚梦酣眠，笑语嫣然化春风。一朝春近晴光好，清波潋滟映芳菲，桃夭夭是蟠桃园含花吐蕊的花苞，历经三千毓秀钟灵，化身一个机灵爽朗，骄憨顽皮的少女。"
      });
        RoleList.Add(new RoleInfo
        {
            Name = "羽灵神",
            Sex = 1,
            Race = Race.Xian,
            UseWeapon = "弓弩,法杖",
            JoinSects = "五庄观,天宫,龙宫,凌波城,花果山",
            Introduce = "    游侠红尘里,豪情动九天.羽灵神热情正直,率性豁达,游侠三界间,交友遍天下;乐见四海尽升平,愿引凤鸣遍九州"
       });
        RoleList.Add(new RoleInfo
        {
            Name = "神天兵",
            Sex = 1,
            Race = Race.Xian,
            UseWeapon = "锤,枪",
            JoinSects = "五庄观,天宫,龙宫,凌波城,花果山",
            Introduce = "    金甲腾云受天命,神枪破逆卫灵霄,神天兵风采鹰扬,锋芒毕露,守护天庭立天威,所向披靡,妖魔皆闻风丧胆"
        });
        RoleList.Add(new RoleInfo
        {
            Name = "龙太子",
            Sex = 1,
            Race = Race.Xian,
            UseWeapon = "枪,扇子",
            JoinSects = "五庄观,天宫,龙宫,凌波城,花果山",
            Introduce = "    乘风破浪翔碧海,腾云架雾上青天,龙太子凭借天生的优势领悟仙法精髓,是当之无愧的龙族骄子,身经百战的天界战将"
        });
        RoleList.Add(new RoleInfo
        {
            Name = "狐美人",
            Sex = 0,
            Race = Race.Mo,
            UseWeapon = "鞭,爪刺",
            JoinSects = "盘丝洞,阴曹地府,魔王寨,无底洞,女魃墓",
            Introduce = "    修眉连娟,斜挑入眉,媚眼如丝,含娇含笑,狐美人柔情绰态,胜似海棠醉日,风情万种,颠倒众生。"

        });
        RoleList.Add(new RoleInfo
        {
            Name = "骨精灵",
            Sex = 0,
            Race = Race.Mo,
            UseWeapon = "魔棒,爪刺",
            JoinSects = "盘丝洞,阴曹地府,魔王寨,无底洞,女魃墓",
            Introduce = "    眉黛春山秀,横波剪秋水,骨精灵娇妍俏皮,顾盼神飞,机敏聪慧,好打不平,对世间万物充满好奇。"

        });
        RoleList.Add(new RoleInfo
        {
            Name = "鬼潇潇",
            Sex = 0,
            Race = Race.Mo,
            UseWeapon = "灯笼,伞",
            JoinSects = "盘丝洞,阴曹地府,魔王寨,无底洞,女魃墓",
            Introduce = "    寒眸印秋水，魂隐三生途，素手执竹伞，影馀幽冥路。鬼潇潇青丝如墨，红杉如火，一对异色瞳里似乎藏着无尽的忧愁和神秘。"

        });
        RoleList.Add(new RoleInfo
        {
            Name = "杀破狼",
            Sex = 1,
            Race = Race.Mo,
            UseWeapon = "宝珠,弓弩",
            JoinSects = "狮驼岭,阴曹地府,魔王寨,无底洞,女魃墓",
            Introduce = "    一啸生风雪,长歌动寒霜,杀破狼飘逸潇洒,气宇轩昂,能文能武,卓尔不群,身具的神秘天狼血统,纵横骄天下,傲立三界间。"

        });
        RoleList.Add(new RoleInfo
        {
            Name = "巨魔王",
            Sex = 1,
            Race = Race.Mo,
            UseWeapon = "斧,刀",
            JoinSects = "狮驼岭,阴曹地府,魔王寨,无底洞,女魃墓",
            Introduce = "    一怒震乾坤,杀气凝如山,巨魔王力拔山气兮盖世,肩负魔族神秘使命,叱咤风云,威风凛凛"
        });
        RoleList.Add(new RoleInfo
        {
            Name = "虎头怪",
            Sex = 1,
            Race = Race.Mo,
            UseWeapon = "斧,锤",
            JoinSects = "狮驼岭,阴曹地府,魔王寨,无底洞,女魃墓",
            Introduce = "    戏谑犹可爱,虽有神力不欺人,虎头怪弯弧五百步,长戟八十斤,勇武过人,生性耿直豁达,对朋友忠肝义胆,是顶天立地的大丈夫"
        });
    }

    public enum Race
    {
        Xian,
        Mo,
        Ren
    }
    
    public RoleInfo GetDefaultRole(Race race)
    {
        var roles = RoleList.Where(role => role.Race == race).ToList();
        return roles[0];
    }
    

    public List<RoleInfo> GetRole(Race race, int sex)
    {
        //根据Race类型和sex类型查找_roleList中符合的数据
        return RoleList.Where(role => role.Race == race && role.Sex == sex).ToList();
    }

    public List<RoleInfo> GetRole(Race race)
    {
        //根据Race类型查找_roleList中符合的数据
        return RoleList.Where(role => role.Race == race).ToList();
    }

    public RoleInfo GetRole(string name)
    {
        return RoleList.FirstOrDefault(role => role.Name == name);
    }

    public class RoleInfo
    {
        public string Name { get; set; }
        public int Sex { get; set; }
        public Race Race { get; set; }
        public string UseWeapon { get; set; }
        public string JoinSects { get; set; }
        
        public string Introduce { get; set; }
        
    }
}